<?php

class Default_Model_Table_Settings extends Zend_Db_Table_Abstract
{
    protected $_name = 'settings';
    
    public function getCopyright()
    {   $val = 'copyright';
        $select = $this->select();
        $select->order('id DESC')
               ->where('type=?',$val)
               ->limit('1');
        $CopyRight = $this->_db->query($select)->fetchAll();
        $CopyRight = $CopyRight['0']['params'];
        return $CopyRight;
    }

        public function getDayQuote()
    {   $val = 'day_quote';
        $select = $this->select();
        $select->order('id DESC')
               ->where('type=?',$val)
               ->limit('1');
        $DayQuote = $this->_db->query($select)->fetchAll();
        $DayQuote = $DayQuote['0']['text'];
        return $DayQuote;
    }

            public function getAdvertise()
    {   $val = 'advertise';
        $select = $this->select();
        $select->order('id DESC')
               ->where('type=?',$val)
               ->limit('1');
        $adv = $this->_db->query($select)->fetchAll();
        $adv=$adv[0];
        return $adv;
    }

}

